<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<meta name="keywords" content="报考,报考系统,网上报考" />
<meta name="description" content="网上报考系统" />
<title>网上报考系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="__ROOT__/css/style.css" />
<link rel="stylesheet" type="text/css" href="__ROOT__/css/skin.css" />
<script type="text/javascript" src="__ROOT__/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo U('Home-js/url');?>"></script>
</head>
<body>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="__ROOT__/images/admin_login/mail_leftbg.gif"><img src="__ROOT__/images/admin_login/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="__ROOT__/images/admin_login/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">管理界面</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="__ROOT__/images/admin_login/mail_rightbg.gif"><img src="__ROOT__/images/admin_login/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="__ROOT__/images/admin_login/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
        
<script type="text/javascript">
    $(function(){
        $('.kaiqi').click(function(){
            var pc_id=this.id;
            $.post("<?php echo U('config/set_pckaiqi');?>",{
                    "pc_id":pc_id
                },function(data){chuli(data.data,pc_id);},'json');
        });


        $('.jinyong').click(function(){
            var pc_id=this.id;
            $.post("<?php echo U('config/set_pcjinyong');?>",{
                    "pc_id":pc_id
                },function(data){chuli(data.data,pc_id);},'json');
        });


        function chuli(data,pc_id){
            switch(data){
                case 0:
                    $('#pop').html('传递批次编号错误，请刷新网页后再次尝试！');
                    break;
                case 8:
                    $('#pop').html('每年级只能有一个批次处于开启状态！');
                    break;
                case 1:
                    $('#pop').html('批次状态设置失败，请刷新网页后再次尝试！');
                    break;
                case 2:
                    $('#pop').html('批次状态设置成功！');
                    alert('批次状态设置成功，网页将自动刷新！');
                    location.href="<?php echo U('config/set_pici');?>"
                    break;
            }
        }


        $('#pop').ajaxStart(function(){
            $('#pop').html('<img src="__ROOT__/images/loading.gif" border="0"><font color="red">数据请求中...请稍后...</font>');
        });
    });
</script>
<div style="margin-top: 30px;margin-left: 20px;">
    <b>报考批次设置：</b><br /><br />
    【<a href="<?php echo U('config/add_pici');?>">增加</a>】<br />
    <span id="pop" style="color:red;"></span><br />
    <table width="900px" border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#000000">
        <tr>
            <td width="8%" align="center">批次编号</td>
            <td width="15%" align="center">批次名称</td>
            <td width="8%" align="center">针对年级</td>
            <td width="8%" align="center">限制人数</td>
            <td width="15%" align="center">时间</td>
            <td width="15%" align="center">地点</td>
            <td width="15%" align="center">备注</td>
            <td width="16%" align="center">操作</td>
        </tr>
        <?php if(is_array($pc_list)): foreach($pc_list as $key=>$pc): ?><tr>
                <td width="8%" align="center"><?php echo ($pc["pc_id"]); ?></td>
                <td width="15%"><?php echo ($pc["pc_name"]); ?></td>
                <td width="8%" align="center"><?php echo ($pc["pc_join"]); ?></td>
                <td width="8%" align="center"><?php echo ($pc["pc_num"]); ?></td>
                <td width="15%"><?php echo ($pc["pc_time"]); ?></td>
                <td width="15%"><?php echo ($pc["pc_address"]); ?></td>
                <td width="15%"><?php echo ($pc["pc_beizhu"]); ?></td>
                <td width="16%" align="center">
                    [<?php
                    if($pc['pc_off']=='t'){
                        echo '<span id="i_'.$pc['pc_id'].'"><a href="#" class="jinyong" id="'.$pc['pc_id'].'"><font color="red">禁用</font></a></span>';
                    }else{
                        echo '<span id="i_'.$pc['pc_id'].'"><a href="#" class="kaiqi" id="'.$pc['pc_id'].'"><font color="green">开启</font></a></span>';
                    }
                    ?>]
                    <!--[<a href="#">修改</a>][<a href="#">删除</a>]-->
                </td>
            </tr><?php endforeach; endif; ?>
    </table>
    <br /><br />
    
</div>
<br />
<font color="red" style="float:left;">说明：显示红色禁用时为开启状态，显示绿色开启为禁用状态。每个年级只能存在唯一一个处于开启状态的批次，已经有学生报考的批次不能进行删除操作！</font>

<div class="banquan">
        <br />
        <br />
    Copyright&nbsp;&reg;&nbsp;2010-2011&nbsp;<a href="http://www.cn-024.cn" target="_blank">沈阳枫叶网络工作室</a> ALL RIGHTS RESERVED
    </div>

    </td>
    <td background="__ROOT__/images/admin_login/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="__ROOT__/images/admin_login/mail_leftbg.gif"><img src="__ROOT__/images/admin_login/buttom_left2.gif" width="17" height="17" /></td>
    <td background="__ROOT__/images/admin_login/buttom_bgs.gif"><img src="__ROOT__/images/admin_login/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="__ROOT__/images/admin_login/mail_rightbg.gif"><img src="__ROOT__/images/admin_login/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</html>